`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date:    08:00:05 12/16/2020 
// Design Name: 
// Module Name:    defines 
// Project Name: 
// Target Devices: 
// Tool versions: 
// Description: 
//
// Dependencies: 
//
// Revision: 
// Revision 0.01 - File Created
// Additional Comments: 
//
//////////////////////////////////////////////////////////////////////////////////
`define 	notUse	3'b111

`define  LB  ( opCode== 6'b 100000 )    
`define  LBU  ( opCode== 6'b 100100 )    
`define  LH  ( opCode== 6'b 100001 )    
`define  LHU  ( opCode== 6'b 100101 )    
`define  LW  ( opCode== 6'b 100011 )    
`define  SB  ( opCode== 6'b 101000 )    
`define  SH  ( opCode== 6'b 101001 )    
`define  SW  ( opCode== 6'b 101011 )    
          
`define  SUB  ( opCode== 6'b 000000 && func== 6'b 100010 )
`define  SUBU  ( opCode== 6'b 000000 && func== 6'b 100011 )
`define  ADD  ( opCode== 6'b 000000 && func== 6'b 100000 )
`define  ADDU  ( opCode== 6'b 000000 && func== 6'b 100001 )
`define  AND  ( opCode== 6'b 000000 && func== 6'b 100100 )
`define  OR  ( opCode== 6'b 000000 && func== 6'b 100101 )
`define  XOR  ( opCode== 6'b 000000 && func== 6'b 100110 )
`define  NOR  ( opCode== 6'b 000000 && func== 6'b 100111 )
`define  SLT  ( opCode== 6'b 000000 && func== 6'b 101010 )
`define  SLTU  ( opCode== 6'b 000000 && func== 6'b 101011 )
          
`define  SLL  ( opCode== 6'b 000000 && func== 6'b 000000 )
`define  SRL  ( opCode== 6'b 000000 && func== 6'b 000010 )
`define  SRA  ( opCode== 6'b 000000 && func== 6'b 000011 )
`define  SLLV  ( opCode== 6'b 000000 && func== 6'b 000100 )
`define  SRLV  ( opCode== 6'b 000000 && func== 6'b 000110 )
`define  SRAV  ( opCode== 6'b 000000 && func== 6'b 000111 )
           
`define  ADDI  ( opCode== 6'b 001000 )
`define  ADDIU  ( opCode== 6'b 001001 )
`define  ANDI  ( opCode== 6'b 001100 )
`define  ORI  ( opCode== 6'b 001101 )
`define  XORI  ( opCode== 6'b 001110 )
`define  LUI  ( opCode== 6'b 001111 )
`define  SLTI  ( opCode== 6'b 001010 )
`define  SLTIU  ( opCode== 6'b 001011 )
          
`define  BEQ  ( opCode== 6'b 000100 )    
`define  BNE  ( opCode== 6'b 000101 )    
`define  BLEZ  ( opCode== 6'b 000110 )    
`define  BGTZ  ( opCode== 6'b 000111 )    
`define  BLTZ  ( opCode== 6'b 000001 && rt== 5'b 00000 )
`define  BGEZ  ( opCode== 6'b 000001 && rt== 5'b 00001 )
           
`define  J  ( opCode== 6'b 000010 )    
`define  JAL  ( opCode== 6'b 000011 )    
`define  JR  ( opCode== 6'b 000000 && func== 6'b 001000 )
`define  JALR  ( opCode== 6'b 000000 && func== 6'b 001001 )
           
`define  MULT  ( opCode== 6'b 000000 && func== 6'b 011000 )
`define  MULTU  ( opCode== 6'b 000000 && func== 6'b 011001 )
`define  DIV  ( opCode== 6'b 000000 && func== 6'b 011010 )
`define  DIVU  ( opCode== 6'b 000000 && func== 6'b 011011 )
          
`define  MFHI  ( opCode== 6'b 000000 && func== 6'b 010000 )
`define  MFLO  ( opCode== 6'b 000000 && func== 6'b 010010 )
`define  MTHI  ( opCode== 6'b 000000 && func== 6'b 010001 )
`define  MTLO  ( opCode== 6'b 000000 && func== 6'b 010011 )




`define aluSUB	5'd0
`define aluSUBU	5'd1
`define aluADD	5'd2
`define aluADDU	5'd3
`define aluAND	5'd4
`define aluOR	5'd5
`define aluXOR	5'd6
`define aluNOR	5'd7
`define aluSLT	5'd8
`define aluSLTU	5'd9
`define aluSLL	5'd10
`define aluSRL	5'd11
`define aluSRA	5'd12
`define aluSLLV	5'd13
`define aluSRLV	5'd14
`define aluSRAV	5'd15

`define cmpEQ	5'd1
`define cmpNE	5'd2
`define cmpLEZ 5'd3
`define cmpGTZ	5'd4
`define cmpLTZ	5'd5
`define cmpGEZ	5'd6

`define WORD		2'b11
`define HALFWORD	2'b01
`define BYTE		2'b00

`define signedExt 2'd0
`define zeroExt 2'd1
`define toHiExt 2'd2
`define shiftExt 2'd3